package com.qf.cs2203Spring07.controller;

import com.qf.cs2203Spring07.entity.Account;
import com.qf.cs2203Spring07.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;

import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;

@Controller
public class AccountController {

    @Autowired
    private AccountService accountService;

   public Integer getmoneyByNum(HttpServletRequest request) throws Exception {
       String id = request.getParameter("id");
       String money = request.getParameter("money");
       Integer money1 = accountService.getMoney(id, new BigDecimal(money));
       return money1;
   }
}
